const mongoose = require('../db/db.js')
const Fav = mongoose.Schema({
	userOpenid: {
		type: String,
		required: true,
		select: true
	},
	createTime: {
		type: Date,
		default: new Date
	},
	goodsId: {
		type: mongoose.Schema.Types.ObjectId,
	},
	favStatus: {
		type: Boolean,
		required: true
	}
},{
	versionKey: false
})
module.exports = mongoose.model('fav', Fav)
